$(document).ready(function() {
    var responsiveHelper = undefined;
    var breakpointDefinition = {
        tablet: 1024,
        phone: 480
    };

///////////////////// blue evento
    var tableElement = $('#bleuEventoTABLE');

    tableElement.dataTable({
        "sDom": "<'row'<'col-md-6'l T><'col-md-6'f>r>t<'row'<'col-md-12'p i>>",
        "oTableTools": {
            "aButtons": [
                {
                    "sExtends": "collection",
                    "sButtonText": "<i class='fa fa-cloud-download'></i>",
                    "aButtons": ["csv", "xls", "pdf", "copy"]
                }
            ]
        },
        "sPaginationType": "bootstrap",
        "aoColumnDefs": [
            {'bSortable': false, 'aTargets': [0]}
        ],
        "aaSorting": [[1, "asc"]],
        "oLanguage": {
            "sLengthMenu": "_MENU_",
            "sInfo": "Mostrando <b>_START_ a _END_</b> de _TOTAL_ registros"
        },
        bAutoWidth: false,
        fnPreDrawCallback: function() {
            // Initialize the responsive datatables helper once.
            if (!responsiveHelper) {
                responsiveHelper = new ResponsiveDatatablesHelper(tableElement, breakpointDefinition);
            }
        },
        fnRowCallback: function(nRow) {
            responsiveHelper.createExpandIcon(nRow);
        },
        fnDrawCallback: function(oSettings) {
            responsiveHelper.respond();
        }
    });

    $('#bleuEventoTABLE_wrapper .dataTables_filter input').addClass("input-medium "); // modify table search input
    $('#bleuEventoTABLE_wrapper .dataTables_length select').addClass("select2-wrapper span12"); // modify table per page dropdown



    $('#bleuEventoTABLE input').click(function() {
        $(this).parent().parent().parent().toggleClass('row_selected');
    });

});